/*
 * @Author: Starfish_DL
 * @Date: 2020-10-07 23:56:23
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-08 00:15:41
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class ManKind {
    protected int sex;
    protected int salary;
    public void manOrWorman() {
        if (this.sex==1) {
            System.out.println("man");
        } else {
            System.out.println("woman");
        }
    }
    public void employeed() {
        if (salary==0) {
            System.out.println("no job");
        } else {
            System.out.println("job");
        }
    }
    public ManKind(int sex,int salary) {
        if (sex==0 || sex==1) {
            this.sex=sex;
        } else {
            System.out.println("设置错误,已为您自动设置为男性");
            this.sex=1;
        }
        if (salary>=0) {
            this.salary=salary;
        } else {
            System.out.println("设置错误,已为您自动设置为0");
            this.salary=0;
        }
    }
}
